From ee822b0248ba4f8e6b2a4dc9333da1b5019c7450 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 26 Sep 2025 13:24:41 +0200 Subject: [PATCH] gir: Add (nullable) to ostree_blob_reader_read_blob return value This adds api docs to ostree_blob_reader_read_blob() so that we can mark the return value as nullable. This is needed, because this function can return NULL without setting error, and this needs to be handled in bindings (such as the rust ones). --- src/libostree/ostree-blob-reader.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/libostree/ostree-blob-reader.c b/src/libostree/ostree-blob-reader.c index 4f1314b8..7d80b1d3 100644 --- a/src/libostree/ostree-blob-reader.c +++ b/src/libostree/ostree-blob-reader.c @@ -29,6 +29,19 @@ ostree_blob_reader_default_init (OstreeBlobReaderInterface *iface) g_debug ("OstreeBlobReader initialization"); } +/** + * ostree_blob_reader_read_blob + * @self: A OstreeBlobReader + * @cancellable: a #GCancellable + * @error: a #GError + * + * Read one blob from the reader, or %NULL if there are no more. + * On error, @error is set and %NULL is returned. + * + * Returns: (nullable): A #GBytes blob, or %NULL if there are no more + * + * Since: 2016.5 + */ GBytes * ostree_blob_reader_read_blob (OstreeBlobReader *self, GCancellable *cancellable, GError **error) { -- 2.30.2